﻿Public Class UCTextbox

    Public Event Changed(sender As UCTextbox)

    Public Sub HideValue()
        TextBox1.PasswordChar = "*"
    End Sub

    Public Property Value As String
        Get
            Return TextBox1.Text
        End Get
        Set(value As String)
            TextBox1.Text = value
        End Set
    End Property
    Public Property Label As String
        Get
            Return Label1.Text
        End Get
        Set(value As String)
            Label1.Text = value
        End Set
    End Property
    Public Property LabelWidth As Integer
        Get
            Return Label1.Width
        End Get
        Set(value As Integer)
            Label1.Width = value
        End Set
    End Property


    Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
        RaiseEvent Changed(Me)
    End Sub
End Class
